import {Role} from '@/api'

const load_route_permission = async (context, payload) => {
    let { status, data,msg } = await Role.route(payload);
    if (status) {
        context.commit("LOAD_ROLE_PERMISSION", data);
    }
    return {status,data,msg}
}

const load_operation_permission = async (context, payload) => {
    let { status, data,msg } = await Role.get_menu(payload);
    if (status) {
        context.commit("LOAD_OPERATION_PERMISSION", data);
    }
    return {status,data,msg}
}

export default{
    load_route_permission,
    load_operation_permission
}